package com.huiyujinrong.qiangdanbao.model;


import com.huiyujinrong.qiangdanbao.bean.ForgetBean;
import com.huiyujinrong.qiangdanbao.network.AppService;

import javax.inject.Inject;

import happyloan.core.EventBusUtil;

public class ForgetModel {

    private AppService service;

    @Inject ForgetModel(AppService service){
        this.service=service;
    }

    public void update(String phone , String smsCode, String newPwd){
        EventBusUtil<ForgetBean> util = new EventBusUtil<>();
        util.sendEvent4Call(service.forget(phone,smsCode,newPwd));
    }

    public void sendCode(String phone ,int codeType){
        EventBusUtil<String> util = new EventBusUtil<>();
        util.sendEvent4Call(service.sendCode(phone,codeType));
    }
}
